<template>
	<view class="page">
		<view class="box">
			<view class="content">
				{{content}}
			</view>
		</view>
		<!-- <view class="box2">
			
		</view> -->
		<button type="default" class="submitButton" hover-class="button-hover" @click="jumpBack(index)">确 定</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				index: 1,
				content: ''
			}
		},
		onLoad(option) {
			this.index = option.index;
			this.setContent();
		},
		methods: {
			jumpBack: function(index) {
				if (index == 0) {
					uni.navigateBack({
						delta: 2
					})
				} else if (index == 1) {
					uni.navigateBack({
						delta: 1
					})
				} else if (index == 2) {
					uni.navigateBack({
						delta: 2
					})
				} else if (index == 3) {
					uni.navigateBack({
						delta: 1,
					})
				} else if (index == 4) {
					uni.navigateBack({
						delta: 2,
					})
				}
			},
			setContent: function() {
				if (this.index == 0) {
					this.content = '您已申请成功，稍后我们将通过服务号通知您申请结果。若有疑问，请咨询客服以获取帮助。'
				} else if (this.index == 1) {
					this.content = '提交成功'
				} else if (this.index == 2) {
					this.content = '打卡成功'
				} else if (this.index == 3) {
					this.content = '请假成功'
				} else if (this.index == 4) {
					this.content = '请耐心等待后台审核通过即可成为机构。'
				}
			}
		},
	}
</script>

<style>
	.page {
		width: 750rpx;
		height: 1334rpx;
		background-color: #FFFFFF;
		display: flex;
		flex-direction: column;
	}

	.box {
		width: 100%;
		height: 525rpx;
		background-color: #fd973f;
		border-radius: 0 0 325rpx 325rpx;
		text-align: center;
	}

	.box2 {
		width: 100%;
		height: 325rpx;
		background-color: #fd973f;
		border-radius: 0 0 325rpx 325rpx;
	}

	.submitButton {
		width: 150rpx;
		height: 60rpx;
		margin-top: 100rpx;
		margin-left: auto;
		margin-right: auto;
		font-size: 20rpx;
		line-height: 60rpx;
		color: #FFFFFF !important;
		background-color: #fd973f !important;
	}

	.button-hover {
		background-color: rgba(0, 0, 0, 0.1) !important;
		opacity: 0.7;
	}

	.content {
		z-index: 55;
		width: 80%;
		height: 500rpx;
		margin-left: auto;
		margin-right: auto;
		margin-top: 100rpx;
		color: #FFFFFF;
		font-size: 35rpx;
	}
</style>
